angular.module('pook')
.config ($stateProvider, $urlRouterProvider, menuManageProvider, ivhTreeviewOptionsProvider) ->
    $stateProvider
    .state('login',
        url: "/login"
        templateUrl: "templates/login/login.html"
        controller: "LoginCtrl"
    )
    .state('register',
        url: "/register"
        templateUrl: "templates/register/register.html"
        controller: "RegisterCtrl"
    )
    .state('home',
        url: "/home"
        templateUrl: "templates/home/home.html"
        controller: "HomeCtrl"
    )
    .state('about-nr',
        url: "/about-nr/:childId"
        templateUrl: "templates/about-nr/about-nr.html"
        controller: "AboutNrCtrl"
        params:
            childId: '0'
    )
    .state('product-service',
        url: "/product-service/:childId"
        templateUrl: "templates/product-service/product-service.html"
        controller: "ProductServiceCtrl"
        params:
            childId: '1'
    )
    .state('news-activity',
        url: "/news-activity/:childId"
        templateUrl: "templates/news-activity/news-activity.html"
        controller: "NewsActivityCtrl"
        params:
            childId: '0'
    )
    .state('product-info',
        url: "/product-info/:childId"
        templateUrl: "templates/product-info/product-info.html"
        controller: "ProductInfoCtrl"
        params:
            childId: '1'
    )
    .state('tec-docs',
        url: "/tec-docs/:childId"
        templateUrl: "templates/tec-docs/tec-docs.html"
        controller: "TecDocsCtrl"
        params:
            childId: '1'
    )
    .state('tec-docs-detail',
        url: "/tec-docs-detail/:childId"
        templateUrl: "templates/tec-docs-detail/tec-docs-detail.html"
        controller: "TecDocsDetailCtrl"
        cache:false
        params:
            childId:'1'
    )
    .state('news-activity-detail',
        url: "/news-activity-detail/:childId"
        templateUrl: "templates/news-activity-detail/news-activity-detail.html"
        controller: "NewsActivityDetailCtrl"
        cache:false
        params:
            childId:'0'
    )
    .state('product-info-detail',
        url: "/product-info-detail/:childId"
        templateUrl: "templates/product-info-detail/product-info-detail.html"
        controller: "ProductInfoDetailCtrl"
        cache:false
        params:
            childId:'0'
    )
    .state('demo-center',
        url: "/demo-center/:childId"
        templateUrl: "templates/demo-center/demo-center.html"
        controller: "DemoCenterCtrl"
        params:
            childId: '9527'
    )
    .state('myself',
        url: "/myself"
        templateUrl: "templates/myself/myself.html"
        controller: "MyselfCtrl"
    )
    $urlRouterProvider.otherwise 'home'
    ivhTreeviewOptionsProvider.set({
        defaultSelectedState: false,
        validate: true,
        twistieCollapsedTpl: '<span class="glyphicon glyphicon glyphicon-plus"></span>',
        twistieExpandedTpl: '<span class="glyphicon glyphicon glyphicon-minus	"></span>',
        twistieLeafTpl: '&nbsp;'
    });